# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=pdftricks
pkgver=0.4.1
pkgrel=1
pkgdesc='Simple, efficient application for small manipulations in PDF files using Ghostscript'
arch=('loong64' 'x86_64')
url='https://github.com/muriloventuroso/pdftricks'
license=('GPL3')
depends=('ghostscript' 'granite' 'imagemagick')
makedepends=('meson' 'vala')
source=("https://github.com/muriloventuroso/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('4b0fa5d73621ef42d6d0040ec2147a43bae2337ea722651525f080f2ae78bea3')

prepare() {
  # Use standard icon name
  sed -i 's/process-completed/gtk-apply/' $pkgname-$pkgver/src/Widgets/*.vala
}

build() {
  arch-meson $pkgname-$pkgver build
  meson compile -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  ln -s com.github.muriloventuroso.pdftricks "$pkgdir/usr/bin/$pkgname"
}
